package dancertracker;

import processing.core.PVector;

public class Joint {
	int id;
	PVector position;
	float confidence;
	PVector prePosition;
	float delta;
	
	Joint(int _id)
	{
		id = _id;
		position = new PVector(0,0,0);
		prePosition = new PVector(0,0,0);
		confidence = 0.0f;
	}
	
	void setValues(PVector _pos, float _conf )
	{
		prePosition = position.get();
		position = _pos.get();
		confidence = _conf;
		delta = position.dist(prePosition);
	}
	
	PVector getPosition()
	{
		return position.get();
	}
	
	PVector getPrePosition()
	{
		return prePosition.get();
	}
	
	float confidence()
	{
		return confidence;
	}
	
	float getDelta()
	{
		return delta;
	}
	
	
}
